<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class WxloginMember extends Model
{
    use HasDateTimeFormatter, SoftDeletes;
    protected $table = 'eb_wxlogin_member';

    protected $primaryKey = 'id';

    protected $fillable = [
        'id',
        'openid',
        'user_id',
        'nickname',
        'sex',
        'province',
        'city',
        'country',
        'headimgurl',
        'unionid',
        'created_at',
        'updated_at',
        'deleted_at',
        'status'
    ];


    public function user()
    {
        return $this->belongsTo(User::class, 'id', 'user_id');
    }
}
